package com.shujia.extends_.exer1;

public class Animal {

    private String name;

    public int age = 15;

    public Animal() {
        System.out.println("Animal 无参构造方法..");
    }

    public Animal(String name) {
        System.out.println("Animal 带参构造方法..");
        this.name = name;
    }

    public void sleep() {
        System.out.println("animal sleep....");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
